home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / FRYANEGG.ZIP / FLOWERS.INC < prev    next >
Encoding:
Text File  |  1996-08-31  |  4.6 KB  |  134 lines

  1.  
  2. //------------------------------------------------------------------->
  3. //------------------------------------------------------------------->
  4. //
  5. // "flowers.inc" - build a flowerpot full of flowers.
  6. //
  7. // Created by: Paul T. Dawson
  8. //             ptdawson@voicenet.com
  9. //             http://www.voicenet.com/~ptdawson
  10. //
  11. //------------------------------------------------------------------->
  12. //------------------------------------------------------------------->
  13. //
  14. // Build the very fancy flowerpot, with flowers. This was originally on
  15. // the mailbox, but that was too far away from the camera. The flowers
  16. // just turned into a little blur! So, I moved this flowerpot a lot closer
  17. // to the camera. Oh, and I put a copy back on the mailbox, too!
  18. //
  19. //------------------------------------------------------------------->
  20. //------------------------------------------------------------------->
  21. //
  22. // The flower base is at 0,0,0 and the nice part of the flower is
  23. // over to the right.
  24.  
  25.         #declare Flower = union {
  26.  
  27.                 // Red petals.
  28.                 #declare A = 0
  29.                 #while ( A < 360 )
  30.  
  31.                         sphere { 0, 3
  32.                         pigment { color rgb < 1, rand(R)*0.5, rand(R)*0.5 > }
  33.                         scale < 1, 0.1, 0.3 >
  34.                         translate x * 3
  35.                         rotate z * ( (rand(R)*120) - 60 )
  36.                         translate y * 0.5
  37.                         rotate x * A
  38.                         } // End of sphere.
  39.  
  40.  
  41.                 #declare A = A + 5
  42.                 #end
  43.  
  44.                 // Green leaves.
  45.                 #declare A = 0
  46.                 #while ( A < 360 )
  47.  
  48.                         sphere { 0, 1.5
  49.                         pigment { Jade }
  50.                         scale < 1, 0.1, 0.3 >
  51.                         translate x * 1.5
  52.                         rotate z * ( 70 + (rand(R)*10) )
  53.                         translate y * 0.01
  54.                         rotate x * A
  55.                         } // End of sphere.
  56.  
  57.  
  58.                 #declare A = A + 36
  59.                 #end
  60.  
  61.                 } // End of union.
  62.  
  63. //------------------------------------------------------------------->
  64. //------------------------------------------------------------------->
  65. //
  66. // Now build the flowerpot, some stalks, and add the flowers.
  67.  
  68.         #declare Fancy_Flowerpot = union {
  69.  
  70.                 // The orange clay part.
  71.                 difference{
  72.                 union{
  73.                 cone { <0,0,0>,3 <0,12,0>,5 pigment{color rgb<0.7,0,0>} }
  74.                 cone { <0,10,0>,5.2 <0,12,0>,5.5 pigment{color rgb<0.7,0,0>} }
  75.                 } // End of union.
  76.                 cone { <0,1,0>,2 <0,13,0>,5.0 pigment{color rgb<0.7,0,0>} }
  77.                 } // End of difference.
  78.  
  79.                 // The dirt (oops, I mean "soil").
  80.                 cylinder{<0,10.9,0><0,11,0>,5 pigment{Brown}
  81.                 normal{crackle 4 scale 0.2} }
  82.  
  83.                 // Some random leaves at soil level.
  84.                 union {
  85.                         #declare A = 0
  86.                         #while ( A < 360 )
  87.                                 sphere { 0,4 scale < 0.1, 1, 0.3 >
  88.                                         rotate z * ( rand(R)*-30 )
  89.                                         translate x * ( (rand(R)*2)+1 )
  90.                                         rotate y * A
  91.                                         translate y * 11
  92.                                         } // End of sphere.
  93.                         #declare A = A + 30
  94.                         #end
  95.                         pigment{Jade scale 0.1 }
  96.                 } // End of union.
  97.  
  98.                 // Start loop for stalks and flowers.
  99.                 #declare A = 0
  100.                 #while ( A < 360 )
  101.  
  102.                 union {
  103.  
  104.                 // The stalks.
  105.                 difference{
  106.                         torus { 12,1 rotate x*90
  107.                                 scale < 0.2, 1, 0.5 >
  108.                                 translate y * -12 }
  109.  
  110.                         box { <0,5,5><-5,-12,-5> inverse }
  111.                         pigment{Green}
  112.                         }
  113.  
  114.                 // Tilt the flower up a little.
  115.                 object { Flower rotate z * 40 }
  116.  
  117.                 #declare HEIGHT = 22 - (A/90)
  118.  
  119.                 translate < 4, HEIGHT, 0 >
  120.                 rotate y*A
  121.  
  122.                 } // End of union.
  123.  
  124.                 #declare A = A + 72
  125.                 #end
  126.  
  127.         } // End of union.
  128.  
  129. //------------------------------------------------------------------->
  130. //------------------------------------------------------------------->
  131. //
  132. // End of this file.
  133.  
  134.